#include "bomb2.h"

bomb2::bomb2() {
    m_X = 0;
    m_Y = 0;
    m_Free = true;
    m_index = 0;
    m_Recorder = 0;

    for (int i = 0; i < BOMB_ME_MAX; ++i) {
        m_pixArr[i].load(QString(BOMB_ME_PATH).arg(i + 1));
    }
}

void bomb2::updateInfo()
{
    if (m_Free) return;

    m_Recorder++;
    if (m_Recorder < BOMB_ME_INTERVAL) return;

    m_Recorder = 0;
    m_index++;
    if (m_index >= BOMB_ME_MAX) {
        m_index = 0;
        m_Free = true;
    }
}
